import config from "@/config"
import http from "@/utils/request"

export default {
    monthsale: {
        url: `${config.API_URL}/adminapi/Workbench/monthSales`,
        name: "月销售回款图",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    weeksale: {
        url: `${config.API_URL}/adminapi/Workbench/weekSales`,
        name: "周销售回款图",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    monthincrease: {
        url: `${config.API_URL}/adminapi/Workbench/monthSalesGrowth`,
        name: "月销售回款增长",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    weekincrease: {
        url: `${config.API_URL}/adminapi/Workbench/weekSalesGrowth`,
        name: "周销售回款增长",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    stocknumber: {
        url: `${config.API_URL}/adminapi/Workbench/saleGoodsNum`,
        name: "销售数量",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    stocknumberhead: {
        url: `${config.API_URL}/adminapi/Workbench/getHeader`,
        name: "销售数据表头月份",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    sale: {
        url: `${config.API_URL}/adminapi/Workbench/collectTable`,
        name: "销售收款报表",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    saleExport: {
        url: `${config.API_URL}/adminapi/Workbench/exportCollect`,
        name: "销售收款报表导出",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
}